<template>
  <div>
    <div class="box">
      <span>车场</span>
      <div class="num" v-for="item in parkNum">
        {{item}}
      </div>
      <span>个</span>
    </div>

    <div class="box" style="margin: 30px 0;">
      <span>商户</span>
      <div class="num" v-for="item in shopNum">
        {{item}}
      </div>
      <span>户</span>
    </div>

    <div class="box">
      <span>用户</span>
      <div class="num" v-for="item in memberNum">
        {{item}}
      </div>
      <span>位</span>
    </div>


  </div>
</template>

<script>
  export default {
    data() {
      return {
        parkNum: ['0','0','9','5'],
        shopNum: ['0','2','2','3'],
        memberNum: ['8','2','1','5']
      }
    },
    mounted() {
      this.getParkNum();
      this.getShopNum();
      this.getMemberNum();
    },
    methods: {
      getParkNum() {
        this.$axios({
          method: 'get',
          url: '/park/park-info/idc-park-count',
          params: {parkAddress: '河北省石家庄市'}
        }).then((res) => {
          if(res.code == 200) {
            // this.parkNum = Array.from(res.data.padStart(4,0)) ;
          }
        })
      },

      getShopNum() {
        this.$axios({
          method: 'get',
          url: '/park/park-info/idc-shop-count',
          params: {parkAddress: '河北省石家庄市'}
        }).then((res) => {
          if(res.code == 200) {
            // this.shopNum = Array.from(res.data.padStart(4,0))
          }
        })
      },

      getMemberNum() {
        this.$axios({
          method: 'get',
          url: '/park/park-info/idc-cust-count'
        }).then((res) => {
          if(res.code == 200) {
            // this.memberNum = Array.from(String(res.data).padStart(4,0))
          }
        })
      }
    }
  }
</script>

<style scoped>
  .box {
    text-align: center;
  }

  span {
    color: #00F4F5;
    font-size: 2.2rem;
    margin: 0 2rem;
  }

  .num {
    display: inline-block;
    text-align: center;
    width: 4rem;
    height: 4.9rem;
    vertical-align: middle;
    background-image: url(../../../../assets/newBigDataSourceImage/number-big.png);
    background-size: 100% 100%;
    margin: 0 0.2rem;
    font-size: 4.8rem;
    color: #00F4F5;
    font-weight: bold;
    -webkit-mask-image:-webkit-gradient(linear,0 0,0 bottom,from(#1676E9),to(rgba(22, 118, 233,0.5)));
  }



</style>
